package com.ruoyi.user.service.impl;

import com.ruoyi.common.utils.DateUtils;

import com.ruoyi.user.domain.FamilyMemberVideoMap1;
import com.ruoyi.user.mapper.FamilyMemberVideoMap1Mapper;
import com.ruoyi.user.service.IFamilyMemberVideoMap1Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 家庭成员与视频映射Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class FamilyMemberVideoMap1ServiceImpl implements IFamilyMemberVideoMap1Service
{
    @Autowired
    private FamilyMemberVideoMap1Mapper familyMemberVideoMap1Mapper;

    /**
     * 查询家庭成员与视频映射
     * 
     * @param id 家庭成员与视频映射主键
     * @return 家庭成员与视频映射
     */
    @Override
    public FamilyMemberVideoMap1 selectFamilyMemberVideoMapById(Long id)
    {
        return familyMemberVideoMap1Mapper.selectFamilyMemberVideoMapById(id);
    }

    /**
     * 查询家庭成员与视频映射列表
     * 
     * @param familyMemberVideoMap1 家庭成员与视频映射
     * @return 家庭成员与视频映射
     */
    @Override
    public List<FamilyMemberVideoMap1> selectFamilyMemberVideoMapList(FamilyMemberVideoMap1 familyMemberVideoMap1)
    {
        return familyMemberVideoMap1Mapper.selectFamilyMemberVideoMapList(familyMemberVideoMap1);
    }

    /**
     * 新增家庭成员与视频映射
     * 
     * @param familyMemberVideoMap1 家庭成员与视频映射
     * @return 结果
     */
    @Override
    public int insertFamilyMemberVideoMap(FamilyMemberVideoMap1 familyMemberVideoMap1)
    {
        familyMemberVideoMap1.setCreateTime(DateUtils.getNowDate());
        return familyMemberVideoMap1Mapper.insertFamilyMemberVideoMap(familyMemberVideoMap1);
    }

    /**
     * 修改家庭成员与视频映射
     * 
     * @param familyMemberVideoMap1 家庭成员与视频映射
     * @return 结果
     */
    @Override
    public int updateFamilyMemberVideoMap(FamilyMemberVideoMap1 familyMemberVideoMap1)
    {
        familyMemberVideoMap1.setUpdateTime(DateUtils.getNowDate());
        return familyMemberVideoMap1Mapper.updateFamilyMemberVideoMap(familyMemberVideoMap1);
    }

    /**
     * 批量删除家庭成员与视频映射
     * 
     * @param ids 需要删除的家庭成员与视频映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberVideoMapByIds(Long[] ids)
    {
        return familyMemberVideoMap1Mapper.deleteFamilyMemberVideoMapByIds(ids);
    }

    /**
     * 删除家庭成员与视频映射信息
     * 
     * @param id 家庭成员与视频映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberVideoMapById(Long id)
    {
        return familyMemberVideoMap1Mapper.deleteFamilyMemberVideoMapById(id);
    }
}
